package org.nstack.header.network.service;

import org.nstack.header.message.APIEvent;
import org.nstack.header.network.l3.L3NetworkInventory;
import org.nstack.header.rest.RestResponse;

import java.util.Arrays;



@RestResponse(allTo = "inventory")
public class APIAttachNetworkServiceToL3NetworkEvent extends APIEvent {

    private L3NetworkInventory inventory;

    public APIAttachNetworkServiceToL3NetworkEvent() {
        super(null);
    }

    public APIAttachNetworkServiceToL3NetworkEvent(String apiId) {
        super(apiId);
    }

    public L3NetworkInventory getInventory() {
        return inventory;
    }

    public void setInventory(L3NetworkInventory inventory) {
        this.inventory = inventory;
    }
 
    public static APIAttachNetworkServiceToL3NetworkEvent __example__() {
        APIAttachNetworkServiceToL3NetworkEvent event = new APIAttachNetworkServiceToL3NetworkEvent();
        L3NetworkInventory l3 = new L3NetworkInventory();
        NetworkServiceL3NetworkRefInventory ns = new NetworkServiceL3NetworkRefInventory();

        String l3Uuid = uuid();
        ns.setL3NetworkUuid(l3Uuid);
        ns.setNetworkServiceProviderUuid(uuid());
        ns.setNetworkServiceType("PortForwarding");

        l3.setUuid(l3Uuid);
        l3.setNetworkServices(Arrays.asList(ns));

        return event;
    }

}
